package com.sjzs.web.dao;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.sjzs.web.po.Pic000;



public class Pic000Dao extends HibernateDaoSupport{
	public Pic000 findById(Long id) {
		return this.getHibernateTemplate().get(Pic000.class, id);
	}

	public void save(Pic000 picture) {
		String id=this.getSession().createSQLQuery("select SEQ_PIC000_ID.nextval from dual").uniqueResult().toString();
		picture.setPicid0(id);
		this.getHibernateTemplate().save(picture);
	}
	public String saveReturnInt(Pic000 picture) {
	 this.getHibernateTemplate().save(picture);
	 return picture.getPicid0();
	}
	public void update(Pic000 picture){
		this.getHibernateTemplate().update(picture);
	}
}
